package com.era.act.dis;

import java.util.List;

import com.era.entity.Classes;
import com.era.srv.ClassSrv;
import com.era.srv.NewsSrv;
import com.opensymphony.xwork2.ActionSupport;

public class ClassAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ClassSrv classSrv;
	private NewsSrv newsSrv;
	private Classes cla;
	private Integer classId;
	private List newsList;
	
	public ClassSrv getClassSrv() {
		return classSrv;
	}

	public void setClassSrv(ClassSrv classSrv) {
		this.classSrv = classSrv;
	}

	public NewsSrv getNewsSrv() {
		return newsSrv;
	}

	public void setNewsSrv(NewsSrv newsSrv) {
		this.newsSrv = newsSrv;
	}

	public Classes getCla() {
		return cla;
	}

	public void setCla(Classes cla) {
		this.cla = cla;
	}

	public Integer getClassId() {
		return classId;
	}

	public void setClassId(Integer classId) {
		this.classId = classId;
	}

	public List getNewsList() {
		return newsList;
	}

	public void setNewsList(List newsList) {
		this.newsList = newsList;
	}

	public String execute() throws Exception{
		cla=classSrv.getCla(classId);
		newsList=newsSrv.getNews(classId);
		
		return SUCCESS;	
	}

}
